#include "StyleDialog.h"
#include <QFile>

StyleDialog::StyleDialog(QWidget *parent)
	: QDialog(parent)
{
	ui.setupUi(this);
	QString strStyle = ReadQssFile(":/qtlearn/Resources/StyleSheet.qss");
	ui.pushButton2->setStyleSheet(strStyle);
}

StyleDialog::~StyleDialog()
{
}


QString StyleDialog::ReadQssFile(const QString& filePath)
{
	QString strStyleSheet = "";
	QFile file(filePath);
	file.open(QFile::ReadOnly);
	if (file.isOpen())
	{
		strStyleSheet = QLatin1String(file.readAll());
	}
	return  strStyleSheet;
}